package com.boyunv.state.example03;
/*
 *@description
 *
 *@author boyunv
 *@create 2023/8/30 20:46
 *@version 1.0
 */

public class RedState implements State{
    @Override
    public void switchToGreen(TrafficLight trafficLight) {
        System.out.println("红灯不能切换为绿灯");   
    }
    
    @Override
    public void switchToRed(TrafficLight trafficLight) {
        System.out.println("当前为红灯,无需切换");
    }
    
    @Override
    public void switchToYellow(TrafficLight trafficLight) {
        System.out.println("黄灯亮起....时长: ---> 10S ");
    }
}
